<!DOCTYPE html>
<html>
	<head>
		<#include "/templates/commons/head.html">
		<script type="text/javascript">
			function query() {
			    document.opForm.action = "${ctx!}/DemoController/dialogList.do";
				document.opForm.submit();
			}
			
			var callbackdata = function () {
			    if(seleBox("ids")){
					var data = [];
					$.each($("input[type='checkbox'][name='ids']:checked"), function(i, o) {
					    var temp = {};
					    temp.id = $(o).val();
					    data.push(temp);
					});
					//只能选一条
					if (data.length > 1) {
					    layer.msg("只能选择一条");
					    return false;
					}
				    return data;
			    }
			}
		</script>
	</head>
	<body>
		<!-- list页面 start -->
		<div id="div-body" class="body">
			<form id="opForm" name="opForm" method="post" class="layui-form">
				<div class="search-head">
			        <!-- 顶部搜索&按钮栏 Start -->
			        <blockquote class="layui-elem-quote">
						<!-- 头部右边搜索条件 Start -->
			            <div class="layui-form layui-list-btn-group">
		                	<!-- 关键字搜索 Start -->
		                	<div class="input-block">
			                	<label class="layui-form-label">关键字</label>
			                    <div class="layui-input-inline">
			                        <input type="text" name="param_keyword" placeholder="请输入关键字" title="内容，备注" autocomplete="off" class="layui-input" value="${Request.param_keyword!}">
			                    </div>
		                	</div>
		                	<!-- 关键字搜索 End -->
			            </div>
			            <!-- 头部右边搜索条件 End -->
					</blockquote>
		        	<!-- 按钮 Start -->
			        <blockquote class="layui-elem-quote list-btn-group">
						<#if Session.CUR_MENU.selectRole == 1>
							<button class="layui-btn query-btn layui-btn-danger" type="button" onclick="query();"><i class="layui-icon">&#xe615;</i>查询</button>
                        </#if>
			        </blockquote>
					<!-- 按钮 End -->
			        <!-- 顶部搜索&按钮栏End -->
		        </div>
		        <!-- table list group Start -->
		        <div id="container">
		        	<!-- message Start -->
		        	<div id="div-message">${message!}</div>
		        	<!-- message End -->
		        	<!-- table list Start -->
		        	<div class="data-grid-group">
		        		<table lay-filter="data-grid" class="layui-table dymanic-table">
		        			<thead>
		        				<tr>
									<th lay-data="{field:'ids', align: 'center', checkbox: true, width: '6%'}"></th>
									<th lay-data="{field:'uuid', align: 'center', width: '6%'}">序号</th>
									<th lay-data="{field:'type', align: 'center', sort:true, width: '10%'}">类型</th>
									<th lay-data="{field:'city', align: 'left', sort:true, width: '10%'}">城市</th>
									<th lay-data="{field:'context', align: 'left', width: '14%'}">内容</th>
									<th lay-data="{field:'remark', align: 'left', width: '10%'}">备注</th>
									<th lay-data="{field:'updateDate', align: 'center', width: '12%'}">更新时间</th>
									<th lay-data="{field:'updateBy', align: 'center', width: '10%'}">更新人</th>
									<th lay-data="{field:'createDate', align: 'center', width: '12%'}">创建时间</th>
									<th lay-data="{field:'createBy', align: 'center', width: '10%'}">创建人</th>
								</tr>
							</thead>
							<tbody>
								<#if resultList??>
									<#list resultList as demoBean>
										<tr>
											<td><input name="ids" type="checkbox" value="${demoBean.id}"/></td>
											<td>${demoBean_index + 1}</td>
											<td><@dict type='role_type' value='${demoBean.type!}'>${typeName!}</@dict></td>
											<td><@city cityCode="${demoBean.city!''}">${cityName}</@city></td>
											<td>${demoBean.context!'-'}</td>
											<td>${demoBean.remark!'-'}</td>
											<td>${demoBean.updateDate!'-'}</td>
											<td>${demoBean.updateBy!'-'}</td>
											<td>${demoBean.createDate!'-'}</td>
											<td>${demoBean.createBy!'-'}</td>
										</tr>
									</#list>
								</#if>
							</tbody>
		        		</table>
		        		<!-- 分页 Start -->
						<div class="page-helper">
							<#include "/templates/commons/page.html">
						</div>
						<!-- 分页 End -->
		        	</div>
		        	<!-- table list End -->
	        	</div>
	        	<!-- table list group End -->
        	</form>
       	</div>
		<!-- list页面 end -->
	</body>
</html>